package niuke;

import java.util.Scanner;

public class 倒置字符串 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        String strs[] = str.split(" ");
        int n = strs.length;
        String result = "";
        for(int i=0;i<strs.length;i++){
            result = result + strs[n-i-1] + " ";
        }
        System.out.println(result.substring(0,result.length()-1));
    }
}
